From 9c56a98430340357e12265c28347a33f6e7ae226 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 11 Sep 2005 16:36:24 +0000 Subject: [PATCH] Yes, that fixes the problem, our patches crossed. I saw Keir already integrated my patch and while it is harmless, it is redundant and here is the diff to take it out. The patch also addresses some indent problems and aligns instructions up with the rest of the block. Signed-Off-By: Leendert van Doorn --- xen/arch/x86/vmx_io.c | 1 - xen/arch/x86/vmx_platform.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/vmx_io.c b/xen/arch/x86/vmx_io.c index 2aaf629865..e4082e2391 100644 --- a/xen/arch/x86/vmx_io.c +++ b/xen/arch/x86/vmx_io.c @@ -198,7 +198,6 @@ void load_cpu_user_regs(struct cpu_user_regs *regs) static inline void __set_reg_value(unsigned long *reg, int size, long value) { switch (size) { - case BYTE: case BYTE_64: *reg &= ~0xFF; *reg |= (value & 0xFF); diff --git a/xen/arch/x86/vmx_platform.c b/xen/arch/x86/vmx_platform.c index 46f465c4cb..9a346bd52e 100644 --- a/xen/arch/x86/vmx_platform.c +++ b/xen/arch/x86/vmx_platform.c @@ -55,7 +55,6 @@ void store_cpu_user_regs(struct cpu_user_regs *regs) static inline long __get_reg_value(unsigned long reg, int size) { switch(size) { - case BYTE: case BYTE_64: return (char)(reg & 0xFF); case WORD: @@ -90,10 +89,11 @@ long get_reg_value(int size, int index, int seg, struct cpu_user_regs *regs) return (char)((regs->rdx & 0xFF00) >> 8); case 7: /* %bh */ return (char)((regs->rbx & 0xFF00) >> 8); - default: + default: printf("Error: (get_reg_value) Invalid index value\n"); - domain_crash_synchronous(); + domain_crash_synchronous(); } + /* NOTREACHED */ } switch (index) { @@ -114,8 +114,8 @@ long get_reg_value(int size, int index, int seg, struct cpu_user_regs *regs) case 14: return __get_reg_value(regs->r14, size); case 15: return __get_reg_value(regs->r15, size); default: - printf("Error: (get_reg_value) Invalid index value\n"); - domain_crash_synchronous(); + printf("Error: (get_reg_value) Invalid index value\n"); + domain_crash_synchronous(); } } #elif defined (__i386__) -- 2.30.2